﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YiLe.BLL.Service;
using YiLe.DAL.Dao;

namespace YiLe.BLL.ServiceImpl
{
    public class RoleService:IRoleService
    {
        private RoleDao roleDao;

        public RoleDao RoleDao
        {
            get { return roleDao; }
            set { roleDao = value; }
        }

        public Model.Domain.Role Get(int id)
        {
            return roleDao.Get(id);
        }

        public IList<Model.Domain.Role> GetAll()
        {
            return roleDao.GetAll();
        }

        public int Save(Model.Domain.Role entity)
        {
            return roleDao.Save(entity);
        }

        public void Update(Model.Domain.Role entity)
        {
            roleDao.Update(entity);
        }

        public void Delete(Model.Domain.Role entity)
        {
            roleDao.Delete(entity);
        }

        public IList<Model.Domain.Role> Search(Model.Domain.Role role)
        {
            return roleDao.Search(role);
        }
    }
}
